package com.heart.servicefeign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Feign方式消费服务
 *
 * @author: heart
 * @date: 2018/6/15
 */
@FeignClient(value = "eureka-client", fallback = FeignErrorService.class)
public interface FeignService {

    @RequestMapping("/home")
    String sayHelloFromEurekaClient(@RequestParam("name") String name,@RequestParam("method") String method);

    @PostMapping("/hello")
    String sayHelloFromEurekaClient(@RequestParam("name") String name);

}
